package com.agentai.system.service.impl;

import com.agentai.framework.common.dict.DictAPI;
import com.agentai.framework.common.dict.DictModel;
import com.agentai.system.service.SysDictDataService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 数据字典
 */
@Service
@AllArgsConstructor
public class SysDictApiServiceImpl implements DictAPI {

    private final SysDictDataService dictDataService;

    @Override
    public String translateDict(String code, String key) {
        return dictDataService.translateDict(code, key);
    }

    @Override
    public List<DictModel> queryDictItemsByCode(String code) {
        return dictDataService.queryDictItemsByCode(code);
    }

    @Override
    public List<DictModel> queryEnableDictItemsByCode(String code) {
        return dictDataService.queryEnableDictItemsByCode(code);
    }
}
